//
//  LineDownHomeTCell.m
//  dmao-customer
//
//  Created by macbook on 2017/10/15.
//  Copyright © 2017年 秦慕乔. All rights reserved.
//

#import "LineDownHomeTCell.h"

@implementation LineDownHomeTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    _OtherLabel.layer.borderColor = [[UIColor redColor]CGColor];
    _OtherLabel.layer.borderWidth = 1.0f;
    [_OtherLabel.layer setCornerRadius:4.0];
    _OtherLabel.layer.masksToBounds = YES;
}

- (void)cellConfigureModel:(NSDictionary *)model{
    if (![TXUtilsString isBlankString:model[@"shopImg"]]) {
        [_IconImg sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://%@", model[@"shopImg"]]] placeholderImage:[UIImage imageNamed:@"NoStore"] options:SDWebImageRetryFailed];
    }else{
        [_IconImg setImage:[UIImage imageNamed:@"NoStore"]];
    }
    
    _StoreName.text = [NSString stringWithFormat:@"%@", model[@"shopName"]];
    _StatusLabel.text = [NSString stringWithFormat:@"%@", model[@"cats"]];
    _DistanceLabel.text = [NSString stringWithFormat:@"%@km", model[@"distances"]];
    _ScoreLabel.text = [NSString stringWithFormat:@"信用分:%@分", model[@"per"]];
    _OtherLabel.text = [NSString stringWithFormat:@" %@ ", model[@"class_name"]];
    NSDictionary *attrs = @{NSFontAttributeName : [UIFont boldSystemFontOfSize:12]};
    CGSize Size_str=[_OtherLabel.text sizeWithAttributes:attrs];
    _OtherLabel.size = Size_str;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
